// request  axios 二次封装的模块
import request from '@/api/request';

// 获取全国的地址相关信息
/* export const req_area = ()=>{
    // request({method，url，arg,headerType})
    return request({method:'get',url:'/area',arg:{},headerType:''})

} */
export const req_area = () => request({ method: 'get', url: '/area', arg: {}, headerType: '' })

// 提交学生信息  arg实际上即是我们收集的表单的信息 form
export const req_stu_info = (arg) => request({ method: 'post', url: '/student_info', arg, headerType: "form" });


// 根据学号查询某个学生的成绩
// http://192.168.110.225:3000/search_info_item?stu_id=  请求get
export const req_stu_info_personal = (stu_id) => request({ method: 'get', url: '/search_info_item', arg: { stu_id }, headerType: '' })

// 请求所有学生的信息
// search_info  
export const req_all_stu_info = () => request({ method: 'get', url: "/search_info", arg: {}, headerType: '' });

// 根据页码请求学生信息   /pages/1 
export const req_code_stu_info = (currentPage) => request({ method: 'get', url: `/pages/${currentPage}`, arg: {}, headerType: '' });

// 所有学生信息 不带头像
export const req_stu_info_nohead = () => request({ method: 'get', url: '/search_info_not', arg: {}, headerType: '' });